package com.wanxi.util;

import java.util.Random;
import java.util.Scanner;

public class TouZi {
    public static void main(String[] args) {
        Random random = new Random();
        int i = random.nextInt(6) + 1;
        System.out.println("骰子的点数为:" + i);
        Scanner scanner = new Scanner(System.in);
        while (true) {
            int num = scanner.nextInt();
            if (num > i) {
                System.out.println("你猜大了");
            } else if (num < i) {
                System.out.println("你猜小了");
            } else {
                System.out.println("正确");
                break;
            }
        }

    }
}
